import { Avatar } from 'element-ui'
import Vue from 'vue'
import Vuex from 'vuex'
import {getUserInfo,} from '../network/profile'
import {getsongurlapi, getsongfinfoapi} from '../network/songlist'

import {playbar} from '../store/playbar'
import {profile} from '../store/profile'


Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    /* userstate:undefined, //登录状态
    userinfo:null, //登录用户信息 */
  },
  mutations: {
    /* UserState(state,payload) {
      state.userstate = payload
    },
    mUserInfo(state, payload) {
      state.userinfo = payload.data
      //console.log(payload.data);
      //console.log(state.userinfo);
    }, */
  },
  actions: {
    //获取用户信息
    /* getuserinfoapi(context){
      return getUserInfo().then(res => {
        context.commit('mUserInfo',res)
        //console.log(res.data);
        return res
      })
    }, */


  },
  getters: {

  },
  modules: {
    profile,
    playbar,
  }
})
